<!-- 商户商品列表 -->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<link href="/css/jquery-select/jquery.searchableSelect.css" rel="stylesheet" type="text/css">
<meta charset="utf-8">
<meta charset="utf-8">
<head th:include="include :: header">
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <div class="fixed-table-toolbar">
                    <div class="columns pull-left">
                    </div>
                    <div class="pull-left search nopadding">
                        <input id="queryItem" name="queryItem" type="text"
                               class="form-control" placeholder="商品名和一级分类名,关键字查询">
                    </div>
                    <div class="columns pull-right" role="group">
                        <button class="btn btn-success" onclick="reLoad()">
                            <i class="fa fa-search" aria-hidden="true"></i>查询
                        </button>
                    </div>
                </div>
                <table id="productTable" data-mobile-responsive="true"></table>
            </div>
        </div>
    </div>

    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-hidden="true">×
                    </button>
                    <h4 class="modal-title">选择商品</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="form-horizontal form-search">
                            <div class="col-xs-12">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right"
                                           style="padding-top:2px;">商品搜索：
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="mgkey" id="mgkey"
                                               placeholder="输入商品ID以及名称搜索"
                                               class="col-xs-10 col-sm-7 form-control">
                                        <span class="input-group-btn">
											<button onclick="get_goods()" type="button"
                                                    class="btn btn-sm btn-primary">搜索
											</button>
											<button onclick="save()" type="button"
                                                    class="btn btn-sm btn-primary">确定
											</button>
										</span>
                                    </div>
                                </div>
                                <div class="space-4"></div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-12">
                            <div>
                                <input name="p" id="p" value="1" type="hidden">
                                <div class="table-responsive">
                                    <table class="table table-striped table-bordered table-hover"
                                           id="dynamic-table">
                                        <thead>
                                        <tr>
                                            <th class="hidden-xs" style="text-align: center">ID</th>
                                            <th>商品图片</th>
                                            <th>商品名称</th>
                                            <th style="border-right: #CCC solid 1px;">操作</th>
                                        </tr>
                                        </thead>
                                        <tbody id="ajax-data">

                                        </tbody>

                                    </table>
                                    <ul class="pagination">
                                        <li><a href="#">&laquo;</a></li>
                                        <li><a href="#">1</a></li>
                                        <li><a href="#">2</a></li>
                                        <li><a href="#">3</a></li>
                                        <li><a href="#">4</a></li>
                                        <li><a href="#">5</a></li>
                                        <li><a href="#">&raquo;</a></li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div>

    <div>
        <script type="text/javascript">
            var s_add_h = 'hidden';
            var s_edit_h = 'hidden';
            var s_remove_h = 'hidden';
            var s_copy_h = 'hidden';
        </script>
    </div>
    <div shiro:hasPermission="product:centre:add">
        <script type="text/javascript">
            s_add_h = '';
        </script>
    </div>
    <div shiro:hasPermission="product:centre:edit">
        <script type="text/javascript">
            s_edit_h = '';
        </script>
    </div>
    <div shiro:hasPermission="product:centre:remove">
        <script type="text/javascript">
            var s_remove_h = '';
        </script>
    </div>
    <div shiro:hasPermission="product:centre:remove">
        <script type="text/javascript">
            var s_copy_h = '';
        </script>
    </div>
</div>
<div th:include="include::footer"></div>
<script src="/js/appjs/reservation/product/reservationProduct.js"></script>
<script src="/js/jquery-select/jquery.searchableSelect.js"></script>
<script type="text/javascript">
    $(function () {
        $('#supply').searchableSelect();
    });
</script>
</body>

</html>